package com.cmict.data.infra.job.message;

import com.cmict.data.framework.quartz.core.handler.JobHandler;
import com.cmict.data.infra.service.message.UserAnnouncementService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

/**
 * 支付通知 Job
 * 通过不断扫描待通知的 PayNotifyTaskDO 记录，回调业务线的回调接口
 *
 * @author awesome
 */
@Component
@Slf4j
public class MessageClockJob implements JobHandler {

    @Resource
    private UserAnnouncementService userAnnouncementService;

    @Override
    public String execute(String param) throws Exception {
       long messageCount =  userAnnouncementService.executeMessageClock(param);
//        return  "0";

        return String.format("消息通知 %s 个", messageCount);
    }

}
